package com.yloveg.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yloveg.dao.ShopAddressMapper;
import com.yloveg.entity.ShopAddress;
import com.yloveg.service.ShopAddressService;

@Service
public class ShopAddressServiceImpl implements  ShopAddressService {
	
    @Autowired
    private ShopAddressMapper shopAddressMapper;

	@Override
	public int insertAddress(ShopAddress record) {
		// TODO Auto-generated method stub
		record.setState(1);
		record.setCreateTime(new Date());
		return shopAddressMapper.insert(record);
	}

	@Override
	public int updateByPrimaryKeySelective(ShopAddress record) {
		// TODO Auto-generated method stub
		return shopAddressMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public ShopAddress selectByPrimaryKey(Long id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<ShopAddress> selectByTerm(ShopAddress record) {
		// TODO Auto-generated method stub
		return shopAddressMapper.selectByTerm(record);
	}


}
